package com.perceptivesoftware.licensing.domain.generated;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.GenerationType;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TwUserval entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TW_USERVAL")
public class TwUserval implements java.io.Serializable
{

	// Fields    

	private String uservalId;

	private TwRoleval twRoleval;

	private TwUserval twUservalByUservalModifiedBy;

	private TwUserval twUservalByUservalCreatedBy;

	private String uservalUserName;

	private String uservalUserDesc;

	private String uservalDeleted;

	private String uservalSuper;

	private Timestamp uservalDateCreated;

	private Timestamp uservalDateModified;

	private String uservalEmail;

	private Set<TwUserpriv> twUserprivs = new HashSet<TwUserpriv>(0);

	private Set<TwRoleval> twRolevalsForRolevalModifiedBy = new HashSet<TwRoleval>(0);

	private Set<TwUserval> twUservalsForUservalModifiedBy = new HashSet<TwUserval>(0);

	private Set<TwRoleval> twRolevalsForRolevalCreatedBy = new HashSet<TwRoleval>(0);

	private Set<TwUserval> twUservalsForUservalCreatedBy = new HashSet<TwUserval>(0);

	// Constructors

	/** default constructor */
	public TwUserval()
	{
		// empty constructor required for Spring
	}

	// Property accessors

	@Id
	@Column(name = "USERVAL_ID", unique = true, nullable = false, length = 38)
	public String getUservalId()
	{
		return this.uservalId;
	}

	public void setUservalId(String uservalId)
	{
		this.uservalId = uservalId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERVAL_ROLE_CODE")
	public TwRoleval getTwRoleval()
	{
		return this.twRoleval;
	}

	public void setTwRoleval(TwRoleval twRoleval)
	{
		this.twRoleval = twRoleval;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERVAL_MODIFIED_BY")
	public TwUserval getTwUservalByUservalModifiedBy()
	{
		return this.twUservalByUservalModifiedBy;
	}

	public void setTwUservalByUservalModifiedBy(TwUserval twUservalByUservalModifiedBy)
	{
		this.twUservalByUservalModifiedBy = twUservalByUservalModifiedBy;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERVAL_CREATED_BY", nullable = false)
	public TwUserval getTwUservalByUservalCreatedBy()
	{
		return this.twUservalByUservalCreatedBy;
	}

	public void setTwUservalByUservalCreatedBy(TwUserval twUservalByUservalCreatedBy)
	{
		this.twUservalByUservalCreatedBy = twUservalByUservalCreatedBy;
	}

	@Column(name = "USERVAL_USER_NAME")
	public String getUservalUserName()
	{
		return this.uservalUserName;
	}

	public void setUservalUserName(String uservalUserName)
	{
		this.uservalUserName = uservalUserName;
	}

	@Column(name = "USERVAL_USER_DESC", length = 512)
	public String getUservalUserDesc()
	{
		return this.uservalUserDesc;
	}

	public void setUservalUserDesc(String uservalUserDesc)
	{
		this.uservalUserDesc = uservalUserDesc;
	}

	@Column(name = "USERVAL_DELETED", length = 1)
	public String getUservalDeleted()
	{
		return this.uservalDeleted;
	}

	public void setUservalDeleted(String uservalDeleted)
	{
		this.uservalDeleted = uservalDeleted;
	}

	@Column(name = "USERVAL_SUPER", length = 1)
	public String getUservalSuper()
	{
		return this.uservalSuper;
	}

	public void setUservalSuper(String uservalSuper)
	{
		this.uservalSuper = uservalSuper;
	}

	@Column(name = "USERVAL_DATE_CREATED", nullable = false, length = 11)
	public Timestamp getUservalDateCreated()
	{
		return this.uservalDateCreated;
	}

	public void setUservalDateCreated(Timestamp uservalDateCreated)
	{
		this.uservalDateCreated = uservalDateCreated;
	}

	@Column(name = "USERVAL_DATE_MODIFIED", length = 11)
	public Timestamp getUservalDateModified()
	{
		return this.uservalDateModified;
	}

	public void setUservalDateModified(Timestamp uservalDateModified)
	{
		this.uservalDateModified = uservalDateModified;
	}

	@Column(name = "USERVAL_EMAIL")
	public String getUservalEmail()
	{
		return this.uservalEmail;
	}

	public void setUservalEmail(String uservalEmail)
	{
		this.uservalEmail = uservalEmail;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "twUserval")
	public Set<TwUserpriv> getTwUserprivs()
	{
		return this.twUserprivs;
	}

	public void setTwUserprivs(Set<TwUserpriv> twUserprivs)
	{
		this.twUserprivs = twUserprivs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "twUservalByRolevalModifiedBy")
	public Set<TwRoleval> getTwRolevalsForRolevalModifiedBy()
	{
		return this.twRolevalsForRolevalModifiedBy;
	}

	public void setTwRolevalsForRolevalModifiedBy(Set<TwRoleval> twRolevalsForRolevalModifiedBy)
	{
		this.twRolevalsForRolevalModifiedBy = twRolevalsForRolevalModifiedBy;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "twUservalByUservalModifiedBy")
	public Set<TwUserval> getTwUservalsForUservalModifiedBy()
	{
		return this.twUservalsForUservalModifiedBy;
	}

	public void setTwUservalsForUservalModifiedBy(Set<TwUserval> twUservalsForUservalModifiedBy)
	{
		this.twUservalsForUservalModifiedBy = twUservalsForUservalModifiedBy;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "twUservalByRolevalCreatedBy")
	public Set<TwRoleval> getTwRolevalsForRolevalCreatedBy()
	{
		return this.twRolevalsForRolevalCreatedBy;
	}

	public void setTwRolevalsForRolevalCreatedBy(Set<TwRoleval> twRolevalsForRolevalCreatedBy)
	{
		this.twRolevalsForRolevalCreatedBy = twRolevalsForRolevalCreatedBy;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "twUservalByUservalCreatedBy")
	public Set<TwUserval> getTwUservalsForUservalCreatedBy()
	{
		return this.twUservalsForUservalCreatedBy;
	}

	public void setTwUservalsForUservalCreatedBy(Set<TwUserval> twUservalsForUservalCreatedBy)
	{
		this.twUservalsForUservalCreatedBy = twUservalsForUservalCreatedBy;
	}

}